package ru.rchervot.sanasar.client.model;


import com.google.gwt.user.client.rpc.IsSerializable;

public abstract class AbstractSort implements Sort, IsSerializable {
	protected boolean ascending;
	
	public AbstractSort() {
		ascending = true;
	}
	
	public AbstractSort(boolean ascending) {
		this.ascending = ascending;
	}
	
	@Override
	public boolean isAscending() {
		return ascending;
	}
	
	@Override
	public String toString() {
		return this.getClass().getName() + "+" + (ascending ? "ASC" : "DESC");
	}
}
